<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <table>
    </table>
    <script>
        var arr = [
            {
                name: 'Jack',
                age: 18,
                gender: '男'
            }, {
                name: 'Rose',
                age: 20,
                gender: '女'
            }, {
                name: 'Top',
                age: 22,
                gender: '男'
            },
            {
                name: 'Top2',
                age: 30,
                gender: '男'
            }
        ]
        var gettable = document.querySelector("table")
       arr.forEach(function(item,key){
        var tr = document.createElement("tr")
        console.log(tr)
        for(var k in item){
            var td = document.createElement("td")
            td.innerHTML = item[k]
            tr.appendChild(td)
            gettable.appendChild(tr)
        }
        var shan = document.createElement("td")
        shan.innerHTML = "删除"
        tr.appendChild(shan)
       })
    </script>
</body>
</html>